* {
	margin: 0;
	padding: 0;
}

html,
body {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-around;
}

.ball-wrapper {
	position: relative;
	height: 200px;
	background-color: yellow;
}

.ball {
	position: absolute;
	width: 40px;
	height: 40px;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
	margin-top: 240px;
	background-color: red;
	border-radius: 50%;
	animation: ball 1s infinite alternate;
}

.shadow {
	position: absolute;
	left: 50%;
	bottom: 0px;
	width: 60px;
	height: 20px;
	transform: translateX(-50%);
	background-color: #000;
	border-radius: 100%;
	animation: shadow 1s infinite alternate;
}
.red {
	background-color: red;
}
.green {
	background-color: green;
	animation-delay: 500ms;
}
.green-shadow {
	animation-delay: 500ms;
}
.blue {
	background-color: blue;
	animation-delay: 1s;
}
.blue-shadow {
	animation-delay: 1;
}
@keyframes ball {
	0% {
		bottom: 15px;
	}
	100% {
		bottom: 100%;
	}
}

@keyframes shadow {
	0% {
		opacity: 0.3;
	}
	100% {
		opacity: 0.08;
	}
}
